package org.metcat.core.metadata;

import java.util.Iterator;

import javax.xml.namespace.NamespaceContext;

/**
 * Author: Bhathiya Jayasekara
 * Date: 11/04/12
 * Time: 11:47 AM
 */

public class NamespaceContextMapper implements NamespaceContext{
	String prefix; 
	String uri;
	
	public NamespaceContextMapper(String prefix, String uri) {
		this.prefix = prefix;
		this.uri = uri;
	}

	@Override
	public String getNamespaceURI(String prefix) {
		String uri = null;
		if(prefix.equals(this.prefix)){
			uri = this.uri;
		}
		return uri;
	}

	@Override
	public String getPrefix(String namespaceURI) {
		// not used
		return null;
	}

	@Override
	public Iterator<Object> getPrefixes(String namespaceURI) {
		// not used
		return null;
	}

}
